package com.liyao.windowtest4.Utils;

import com.liyao.windowtest4.controller.WrenchTask;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: windowtest4
 * @description:
 * @author: liu yan
 * @create: 2024-11-03 17:09
 */
public class GlobalConfig {

    private static Map<String, WrenchTask> wrenchTaskMap = new HashMap<>();

    public static void setWrenchTask(String sn, WrenchTask task) {
        wrenchTaskMap.put(sn, task);
        System.out.println("wrenchTaskMap的长度："+wrenchTaskMap.size());
    }

    public static WrenchTask getWrenchTask(String sn) {
        return wrenchTaskMap.get(sn);
    }
}
